/*
 *  Copyright 2009 Jamie Gennis <jgennis@gmail.com>.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package com.google.code.gwt.remoteaction.batch.client;

import com.google.code.gwt.remoteaction.client.Action;
import com.google.code.gwt.remoteaction.client.RemoteAction;
import com.google.code.gwt.remoteaction.client.RemoteActionService;
import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * An action service for testing the Remote Action Batch library.
 *
 * @author Jamie Gennis <jgennis@gmail.com>
 */
public interface Service extends RemoteActionService {

  public static class Get2 implements Action {

    public int two;

    @SuppressWarnings("unused")
	private Get2() {
    }

    public Get2(int two) {
      this.two = two;
    }
  }

  public static class Get3 implements Action {

    public int three;

    @SuppressWarnings("unused")
	private Get3() {
    }

    public Get3(int three) {
      this.three = three;
    }
  }

  public static class Get5 implements Action {

    public int five;

    @SuppressWarnings("unused")
	private Get5() {
    }

    public Get5(int five) {
      this.five = five;
    }
  }

  public static class Get7 implements Action {

    public int seven;

    @SuppressWarnings("unused")
	private Get7() {
    }

    public Get7(int seven) {
      this.seven = seven;
    }
  }

  public static class Get11 implements Action {

    public int eleven;

    @SuppressWarnings("unused")
	private Get11() {
    }

    public Get11(int eleven) {
      this.eleven = eleven;
    }
  }

  public static class Exception11 extends Exception implements IsSerializable {
  }

  @RemoteAction(Get2.class)
  public int get2(int two);

  @RemoteAction(Get3.class)
  public int get3(int three);

  @RemoteAction(Get5.class)
  public int get5(int five);

  @RemoteAction(Get7.class)
  public int get7(int seven);

  @RemoteAction(Get11.class)
  public int get11(int eleven) throws Exception11;
}
